package com.jyxd.web.data.patient;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * 患者危急值
 */
@Entity
@Table(name = "p_patient_critical_description")
@Data
public class PatientCriticalDescription {

    /**
     * 序列
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;

    @ApiModelProperty("患者id")
    @Column(name = "patient_id")
    private String patientId;

    @ApiModelProperty("患者住院号")
    @Column(name = "visit_number")
    private String visitNumber;

    @ApiModelProperty("检测报告id")
    @Column(name = "report_number")
    private String reportNumber;

    @ApiModelProperty("危急值内容")
    @Column(name = "critical_description")
    private String criticalDescription;

    @ApiModelProperty("危急值id")
    @Column(name = "critical_id")
    private String criticalId;


    @ApiModelProperty("数据时间")
    @Column(name = "data_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dataTime;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("危急值类型")
    @Column(name = "type")
    private String type;

    @ApiModelProperty("状态")
    @Column(name = "status")
    private Integer status;
}
